int pd(int n, int space_c, int x, int y)   //жǷ񵽵
{
    int i, j;
    for (i = 0; i < 4; i++)
    {
        for (j = 0; j < 4; j++)
        {
            if (dia[n][space_c].space[i][j] == 0)
                continue;
            else if (face.data[x + i][y + j] == Wall || face.data[x + i][y + j] == Box)
                return 0;
        }
    }
    return 1;
}
